package com.ruoyi.kong.entity;

import lombok.Data;


@Data
public class KongTarget implements Comparable {

    private Long created_at;
    private EntityId upstream;
    private String id;
    private String target;
    private int weight;

    @Override
    public int compareTo(Object o) {
        if (o == null) {
            return 1;
        }
        KongTarget upstream = null;
        if (o instanceof KongTarget) {
            upstream = (KongTarget) o;
        }
        return upstream.created_at.compareTo(this.created_at);
    }
}
